package com.hskn.hss.module.carTrack.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.math.BigDecimal;
@ApiModel(value = "车辆详情速度油量查询接口-VO", description = "车辆详情速度油量查询接口-VO")
public class LastCarTrackVo implements Serializable {
    /**
     *速度
     */
    @ApiModelProperty(value = "速度", name = "speed", example = "0.00")
    private BigDecimal speed;
    /**
     * 油量
     */
    @ApiModelProperty(value = "油量", name = "oilMass", example = "0.00")
    private BigDecimal oilMass;

    public BigDecimal getSpeed() {
        if (speed!=null) {
            return speed.setScale(2,BigDecimal.ROUND_HALF_UP);
        }else {
            return BigDecimal.ZERO.setScale(2);
        }
    }

    public void setSpeed(BigDecimal speed) {
        this.speed = speed;
    }

    public BigDecimal getOilMass() {
        if (oilMass!=null) {
            return oilMass.setScale(2,BigDecimal.ROUND_HALF_UP);
        }else {
            return BigDecimal.ZERO.setScale(2);
        }
    }

    public void setOilMass(BigDecimal oilMass) {
        this.oilMass = oilMass;
    }
}

